
var newer = newer || {};
newer.gd = newer.gd || {};

newer.TabsHelper = {
	pressTab: function(self, id, sclass, rclass, onClickHandler, ridsnttls) {
		$("#"+id).removeClass(rclass).addClass(sclass);
		$("#"+id).off("click");
		$.each(ridsnttls, function(rid, ttl) {
			if(id != rid) {
				newer.TabsHelper.releaseTab(self, rid, sclass, rclass, ttl, onClickHandler);
			}
		});
	}, 
	
	releaseTab: function(self, id, sclass, rclass, title, onClickHandler) {
		$("#"+id).addClass(rclass).removeClass(sclass);
		$("#"+id).off("click");
		$("#"+id).on("click", {id:id,self:self,title:title},onClickHandler);
	}
};